<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<% 
 /**
  功能名称:学生批量导入
  
  创建人:
**/
%>
<%
String path = request.getContextPath();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>学生批量导入</title>
	<link href="<%=path%>/css/index_css.css" rel="stylesheet" type="text/css" />
	<script src="<%=path%>/js/resizeIframe.js" type="text/javascript"></script>
	<script type="text/javascript">
		window.onload = function(){
      	
      	resizeIframe();
        
          
        
        if('${requestScope.info}'!=null && '${requestScope.info}'!=''){
        	alert('${requestScope.info}');
        }
      }
      
       function returnBack(){
      	window.location.href='${requestScope.BACKURL }';
      }
      
       function doSubmit(){
      	if(document.getElementById('file')!=null && document.getElementById('file').value.length==0){
      		alert('请您选择要上传的excel文件');
      		return;
      	}
      	document.myform.submit();
      	document.getElementById('buttonDiv').innerHTML="<img src=\"<%=path %>/images/jindu.gif\" width=\"30\" height=\"30\" align=\"absmiddle\" />正在导入...";
      }
      
       function changeType(chooseValue){
      	document.getElementById('chooseType').value=chooseValue;
      }
      
	</script>
	<style type="text/css">
		.excel{ background-color:#999; font-size:13px;}
		.excel td{ background-color:#fff; white-space:nowrap;}
		.excel th{ background-color:#E7E7E7; font-weight:normal;}
	</style>
  </head>
  
  <body>
<table  width="650" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" align="right" valign="bottom" bgcolor="#ECE9D8"><img src="<%=path %>/images/bk_13.gif" width="18" height="18" align="absmiddle" /><a href="javascript:returnBack();">返回</a>&nbsp;&nbsp;&nbsp;<img src="<%=path %>/images/nv_hidden.gif" width="14" height="14" border="0" /> <a href="<%=path %>/doExportTemplateUserAction.action?user.userType=1">下载导入用户模板</a>&nbsp;&nbsp;</td>
  </tr>
  <tr>
    <td align="center" valign="top" bgcolor="#ECE9D8"><table width="95%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="1" bgcolor="#ABA899"></td>
      </tr>
      <tr>
        <td height="1" bgcolor="#FFFFFF"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="25" align="center" valign="middle" bgcolor="#ECE9D8">
    <form name="myform" action="<%=path %>/batchAddStudentUserAction.action" enctype="multipart/form-data" method="post">
    <input type="hidden" name="backURL" value="${requestScope.BACKURL }">
    <input id="chooseType" type="hidden" name="chooseType" value="NO">
    <table width="95%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="35" align="center" valign="bottom"><input id="file" name="file" type="file" size="45" /></td>
      </tr>
       <tr>
        <td height="35" align="center">如果系统存在相同帐号或学籍编号，则：
          <input id="chooseA" name="chooseRdo" type="radio" value="radiobutton" checked="checked" onclick="changeType('NO');" />
          不做处理
          <input id="chooseB" name="chooseRdo" type="radio" value="radiobutton" onclick="changeType('YES');" />
          覆盖已有记录</td>
      </tr>
      <tr>
        <td height="35" align="center"><div id="buttonDiv"><input type="button" onclick="doSubmit();" name="Submit" value="提 交" /></div>&nbsp;&nbsp;&nbsp;</td>
      </tr>
    </table>
    </form>
    </td>
  </tr>
  <tr>
    <td height="25" align="left" valign="top" bgcolor="#ECE9D8" class="border_2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="top" class="tb_10 border_2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="25" align="left" class="f_4">一、常用模板格式</td>
          </tr>
          <tr>
            <td height="120" align="left" valign="top">
            <div style="overflow: auto; width: 610px; height: 100%;">
			<table class="excel" cellspacing="1" cellpadding="3">
			  <tr>
			    <th scope="col"></th>
			    <th scope="col">A</th>
			    <th scope="col">B</th>
			    <th scope="col">C</th>
			    <th scope="col">D</th>
				<th scope="col">E</th>
			    <th scope="col">F</th>
			    <th scope="col">G</th>
			    <th scope="col">H</th>
			    <th scope="col">I</th>
			    <th scope="col">J</th>
			    <th scope="col">K</th>
			    <th scope="col">L</th>
			    <th scope="col">M</th>
			    <th scope="col">N</th>
			    <th scope="col">O</th>
			    <th scope="col">P</th>
			    <th scope="col">Q</th>
			    <th scope="col">R</th>
			    <th scope="col">S</th>
			    <th scope="col">T</th>
			    <th scope="col">U</th>
			    <th scope="col">V</th>
			    <th scope="col">W</th>
			    <th scope="col">X</th>
			    <th scope="col">Y</th>
			    <th scope="col">Z</th>
			    <th scope="col">AA</th>
			    <th scope="col">AB</th>
			    <th scope="col">AC</th>
			    <th scope="col">AD</th>
			  </tr>
			  <tr>
			    <th scope="row">1</th>
			    <td>学籍编号</td>
			    <td>帐号</td>
			    <td>姓名</td>
			    <td>密码</td>
			    <td>性别</td>
			    <td>手机号1</td>
			    <td>手机号2</td>
			    <td>地址</td>
			    <td>邮政编码</td>
			    <td>政治面貌</td>
			    <td>籍贯</td>
			    <td>血型</td>
			    <td>港澳台侨</td>
			    <td>是否贫困</td>
			    <td>国籍</td>
			    <td>民族</td>
			    <td>户口类别</td>
			    <td>户口所在地</td>
			    <td>电子邮件</td>
			    <td>曾用名</td>
			    <td>出生年月日</td>
			    <td>别名</td>
			    <td>家庭电话</td>
			    <td>身份证号</td>
			    <td>毕业证号</td>
			    <td>毕业时间</td>
			    <td>毕业评语</td>
			    <td>入学时间</td>
			    <td>学生类别</td>
			    <td>健康状况</td>
			  </tr>
			  <tr>
			    <th scope="row">2</th>
			    <td>A001001</td>
			    <td>zhangsan</td>
			    <td>张三</td>
			    <td>123</td>
			    <td><br></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			  </tr>
			  <tr>
			    <th scope="row">3</th>
			    <td>A001002</td>
			    <td>lisi</td>
			    <td>李四</td>
			    <td>345</td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			    <td></td>
			  </tr>
			</table>
				</div>
            </td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle"><span class="f_4">二、高级导入格式</span></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="top" style="line-height:20px">注：上传必须为Excel表单格式，后缀为.xls，并且所上传文件的表格列名如下： <br />
              帐号,姓名,性别,密码,曾用名,身份证号,出生年月,手机号码,政治面貌,民族,国籍,籍贯,户口类型,户口所在地,<br />
              家庭地址,电子邮件,备注;如列名与上面不符，则可能造成导入信息失败。<font color="red">其中学籍编号、帐号和姓名不能为空，</font><br />其他列可
              为空或不导入。时间必须遵守“2007-01-28”格式。 </td>
          </tr>
          <tr>
            <td height="25"><span class="f_4">以上列出的导入值必须遵守下面的格式：</span></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DCDCDC">
              <tr>
                <td width="14%" height="25" align="right" bgcolor="#FFFFFF" class="f_4">性别&nbsp;</td>
                <td width="86%" bgcolor="#FFFFFF">
                	<c:forEach items="${requestScope.CODETYPE}" var="t">
                		<c:if test="${t.codeId=='sex'}">
                			<c:forEach items="${t.codeSelects}" var="s" varStatus="i" begin="0" step="1">
                				<c:if test="${i.count==fn:length(t.codeSelects)}">
                				${s.name }
                				</c:if>
                				<c:if test="${i.count!=fn:length(t.codeSelects)}">
                				${s.name },
                				</c:if>
                				
                			</c:forEach>
                		</c:if>
                	</c:forEach>
                </td>
              </tr>
              <tr>
                <td height="25" align="right" bgcolor="#FFFFFF" class="f_4">血型&nbsp;</td>
                <td bgcolor="#FFFFFF">
                	<c:forEach items="${requestScope.CODETYPE}" var="t">
                		<c:if test="${t.codeId=='bloodType'}">
                			<c:forEach items="${t.codeSelects}" var="s" varStatus="i" begin="0" step="1">
                				<c:if test="${i.count==fn:length(t.codeSelects)}">
                				${s.name }
                				</c:if>
                				<c:if test="${i.count!=fn:length(t.codeSelects)}">
                				${s.name },
                				</c:if>
                				
                			</c:forEach>
                		</c:if>
                	</c:forEach>
                </td>
              </tr>
              <tr>
                <td height="25" align="right" bgcolor="#FFFFFF" class="f_4">民族&nbsp;</td>
                <td bgcolor="#FFFFFF">
                	<c:forEach items="${requestScope.CODETYPE}" var="t">
                		<c:if test="${t.codeId=='folk'}">
                			<c:forEach items="${t.codeSelects}" var="s" varStatus="i" begin="0" step="1">
                				<c:if test="${i.count==fn:length(t.codeSelects)}">
                				${s.name }
                				</c:if>
                				<c:if test="${i.count!=fn:length(t.codeSelects)}">
                				${s.name },
                				</c:if>
                				
                			</c:forEach>
                		</c:if>
                	</c:forEach>
                </td>
              </tr>
              <tr>
                <td height="25" align="right" bgcolor="#FFFFFF" class="f_4">户口类型&nbsp;</td>
                <td bgcolor="#FFFFFF">
                	<c:forEach items="${requestScope.CODETYPE}" var="t">
                		<c:if test="${t.codeId=='registeredPermanentResidence'}">
                			<c:forEach items="${t.codeSelects}" var="s" varStatus="i" begin="0" step="1">
                				<c:if test="${i.count==fn:length(t.codeSelects)}">
                				${s.name }
                				</c:if>
                				<c:if test="${i.count!=fn:length(t.codeSelects)}">
                				${s.name },
                				</c:if>
                				
                			</c:forEach>
                		</c:if>
                	</c:forEach>
                </td>
              </tr>
              <tr>
                <td height="25" align="right" bgcolor="#FFFFFF" class="f_4">教育程度&nbsp;</td>
                <td bgcolor="#FFFFFF">
                	<c:forEach items="${requestScope.CODETYPE}" var="t">
                		<c:if test="${t.codeId=='T4658'}">
                			<c:forEach items="${t.codeSelects}" var="s" varStatus="i" begin="0" step="1">
                				<c:if test="${i.count==fn:length(t.codeSelects)}">
                				${s.name }
                				</c:if>
                				<c:if test="${i.count!=fn:length(t.codeSelects)}">
                				${s.name },
                				</c:if>
                				
                			</c:forEach>
                		</c:if>
                	</c:forEach>
                </td>
              </tr>
              <tr>
                <td height="25" align="right" bgcolor="#FFFFFF" class="f_4">健康状况&nbsp;</td>
                <td bgcolor="#FFFFFF">
                	<c:forEach items="${requestScope.CODETYPE}" var="t">
                		<c:if test="${t.codeId=='healthStatus'}">
                			<c:forEach items="${t.codeSelects}" var="s" varStatus="i" begin="0" step="1">
                				<c:if test="${i.count==fn:length(t.codeSelects)}">
                				${s.name }
                				</c:if>
                				<c:if test="${i.count!=fn:length(t.codeSelects)}">
                				${s.name },
                				</c:if>
                				
                			</c:forEach>
                		</c:if>
                	</c:forEach>
                </td>
              </tr>
              <tr>
                <td height="25" align="right" bgcolor="#FFFFFF" class="f_4">政治面貌&nbsp;</td>
                <td bgcolor="#FFFFFF" style="line-height:20px">
                	<c:forEach items="${requestScope.CODETYPE}" var="t">
                		<c:if test="${t.codeId=='polityVisage'}">
                			<c:forEach items="${t.codeSelects}" var="s" varStatus="i" begin="0" step="1">
                				<c:if test="${i.count==fn:length(t.codeSelects)}">
                				${s.name }
                				</c:if>
                				<c:if test="${i.count!=fn:length(t.codeSelects)}">
                				${s.name },
                				</c:if>
                				
                			</c:forEach>
                		</c:if>
                	</c:forEach>
                </td>
              </tr>
              
              <tr>
                <td height="25" align="right" bgcolor="#FFFFFF" class="f_4">国籍&nbsp;</td>
                <td bgcolor="#FFFFFF">
                	<c:forEach items="${requestScope.CODETYPE}" var="t">
                		<c:if test="${t.codeId=='nationality'}">
                			<c:forEach items="${t.codeSelects}" var="s" varStatus="i" begin="0" step="1">
                				<c:if test="${i.count==fn:length(t.codeSelects)}">
                				${s.name }
                				</c:if>
                				<c:if test="${i.count!=fn:length(t.codeSelects)}">
                				${s.name },
                				</c:if>
                				
                			</c:forEach>
                		</c:if>
                	</c:forEach>
                </td>
              </tr>
              
         
              
              
           
              
               <tr>
                <td height="25" align="right" bgcolor="#FFFFFF" class="f_4">是否贫困&nbsp;</td>
                <td bgcolor="#FFFFFF">
                	<c:forEach items="${requestScope.CODETYPE}" var="t">
                		<c:if test="${t.codeId=='isPoor'}">
                			<c:forEach items="${t.codeSelects}" var="s" varStatus="i" begin="0" step="1">
                				<c:if test="${i.count==fn:length(t.codeSelects)}">
                				${s.name }
                				</c:if>
                				<c:if test="${i.count!=fn:length(t.codeSelects)}">
                				${s.name },
                				</c:if>
                				
                			</c:forEach>
                		</c:if>
                	</c:forEach>
                </td>
              </tr>
               <tr>
                <td height="25" align="right" bgcolor="#FFFFFF" class="f_4">港澳台侨&nbsp;</td>
                <td bgcolor="#FFFFFF">
                	<c:forEach items="${requestScope.CODETYPE}" var="t">
                		<c:if test="${t.codeId=='overseasChinese'}">
                			<c:forEach items="${t.codeSelects}" var="s" varStatus="i" begin="0" step="1">
                				<c:if test="${i.count==fn:length(t.codeSelects)}">
                				${s.name }
                				</c:if>
                				<c:if test="${i.count!=fn:length(t.codeSelects)}">
                				${s.name },
                				</c:if>
                				
                			</c:forEach>
                		</c:if>
                	</c:forEach>
                </td>
              </tr>
              
               <tr>
                <td height="25" align="right" bgcolor="#FFFFFF" class="f_4">学生类别&nbsp;</td>
                <td bgcolor="#FFFFFF">
                	<c:forEach items="${requestScope.CODETYPE}" var="t">
                		<c:if test="${t.codeId=='studentType'}">
                			<c:forEach items="${t.codeSelects}" var="s" varStatus="i" begin="0" step="1">
                				<c:if test="${i.count==fn:length(t.codeSelects)}">
                				${s.name }
                				</c:if>
                				<c:if test="${i.count!=fn:length(t.codeSelects)}">
                				${s.name },
                				</c:if>
                				
                			</c:forEach>
                		</c:if>
                	</c:forEach>
                </td>
              </tr>
            </table></td>
          </tr>
          
          <tr>
            <td height="25" class="f_2">说明1:每列只能选择所有值中的一个值进行导入，根据需要将上面列出的信息拷贝到对应的Excel表格的单元格里
           <br>说明2:如果某一列不是密码，且该列未填，该列就会被跳过而不更新；如果该列是密码，且该列未填，则密码将被自动设置为跟帐号相同
           </td>
          </tr>
          
          
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="25" align="center" valign="middle" bgcolor="#ECE9D8"></td>
  </tr>
</table>
</body>
</html>
